<cfscript>
// Creates single parts 
monitor     = createObject('component','SinglePart').init("LCD Monitor"); 
keyboard    = createObject('component','SinglePart').init("Italian Keyboard"); 
processor   = createObject('component','SinglePart').init("Pentium III Processor"); 
ram         = createObject('component','SinglePart').init("256 KB RAM"); 
hardDisk    = createObject('component','SinglePart').init("40 Gb Hard Disk");

mainSystem = createObject('component','CompoundPart').init( "Main System" ); 
computer = createObject('component','CompoundPart').init("Computer"); 




mainSystem.add( processor ); 
mainSystem.add( ram ); 
mainSystem.add( hardDisk ); 


computer.add( monitor ); 
computer.add( keyboard ); 
computer.add( mainSystem ); 
computer.remove( monitor );
monitor.describe(); 
computer.describe();
</cfscript>

<cfdump var="#computer#">